﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

namespace GetStarted.Framework.Utils
{
    public class XmlUtils
    {
        public static void Serialize<T>(T target,string filePath)
        {
            var fs = File.Create(filePath);
            var writer = XmlWriter.Create(fs);
            XmlSerializer xml = new XmlSerializer(typeof(T));
            
            xml.Serialize(writer, target);
        }
    }
}
